home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / var / lib / dpkg / info / sg3-utils.preinst < prev    next >
Text File  |  2008-05-03  |  1KB  |  49 lines

  1. #! /bin/sh
  2. # preinst script for sg-utils
  3. #
  4. # see: dh_installdeb(1)
  5.  
  6. set -e
  7.  
  8. # summary of how this script can be called:
  9. #        * <new-preinst> `install'
  10. #        * <new-preinst> `install' <old-version>
  11. #        * <new-preinst> `upgrade' <old-version>
  12. #        * <old-preinst> `abort-upgrade' <new-version>
  13. #
  14. # For details see /usr/share/doc/packaging-manual/
  15.  
  16. case "$1" in
  17.     install|upgrade)
  18.       kernel_version=`/bin/uname -r`;
  19.       major_version=`echo $kernel_version | sed 's/\.[0-9]\+$//'`;
  20.       minor_version=`echo $kernel_version | sed 's/.*\.\([0-9]\+\)/\1/'`;
  21.  
  22.       case $major_version in
  23.     2.[0-3])
  24.         echo "You are running linux kernel version $kernel_version."
  25.         echo "sg3_utils will not work on kernels older than 2.4."
  26.         echo "If you want to run code with older kernels, please"
  27.         echo "install sg_utils instead."
  28.         exit 0;
  29.         ;;
  30.     *)
  31.       esac
  32.     ;;
  33.  
  34.     abort-upgrade)
  35.     ;;
  36.  
  37.     *)
  38.         echo "preinst called with unknown argument \`$1'" >&2
  39.         exit 0
  40.     ;;
  41. esac
  42.  
  43. # dh_installdeb will replace this with shell code automatically
  44. # generated by other debhelper scripts.
  45.  
  46.  
  47.  
  48. exit 0
  49.